﻿using PmSoft.Core.Domain.Auth;

namespace Demo.PetaPoco.Application.Dtos.Auth;

/// <summary>
/// 认证用户
/// </summary>
public class AuthUser : IAuthedUser
{
	public int UserId { get; set; }

	public string UserType { get; set; } = string.Empty;

	public IEnumerable<IRole> Roles { get; set; } = new List<IRole>();

	public string Name { get; set; } = string.Empty;

	public string? TenantType { get; set; }

	bool IAuthedUser.IsSuperAdmin()
	{
		return UserType == "SuperAdministrator";
	}
}
